package com.yutian.endecryption.mock.mapper;

import com.yutian.endecryption.mock.pojo.ExaminerRecord;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * 考试员备案信息mapper
 *
 * @author zhang peng yang ming
 * @create 2017-08-02 9:59
 */
public interface ExaminerRecordMapper {
    @Select("SELECT * FROM vt_examiner_record_info WHERE sfzmhm=#{sfzmhm};")
    ExaminerRecord retrieve(String sfzmhm);

    @Update("UPDATE vt_examiner_record_info SET sfzmmc=#{sfzmmc}, xh=#{xh}, xm=#{xm}, jbr=#{jbr}, fzrq=#{fzrq}, kszyxqz=#{kszyxqz}, cjsj=#{cjsj}, gxsj=#{gxsj} WHERE sfzmhm=#{sfzmhm}")
    int update(ExaminerRecord record);

    @Insert("INSERT INTO vt_examiner_record_info (xh, jbr, sfzmmc, sfzmhm, xm, fzrq, kszyxqz, cjsj, gxsj) VALUES (#{xh}, #{jbr}, #{sfzmmc}, #{sfzmhm}, #{xm}, #{fzrq}, #{kszyxqz}, #{cjsj}, #{gxsj})")
    int create(ExaminerRecord record);
}
